using System;
using System.Collections.Generic;

namespace TheGameClient.Processes
{
	public interface ISecuritySystem : IProcess
	{
		SecuritySystemState State { get; set; }
		event EventHandler<AccessAttemptEventArgs> BypassAttempt; //subscribed by: GenericSystemInterface, fired when: SecuritySystem::Bypass() finished execution
		event EventHandler<AccessAttemptEventArgs> AccessAttempt; //subscribed by: GenericSystemInterface, fired when: SecuritySystem::Access() finished execution
		
		void Bypass(IProgram bypasser); //used by bypassers
		void Access();					//used by: this object, contains the control's code for accessing the security system (example: assigning username and password values to variables)

		void SetBypassResult(bool successful); //used by GenericSystemInterface, to provide reaction on BypassAttempt event
		void SetAccessResult(bool successful); //used by GenericSystemInterface, to provide reaction on AccessAttempt event
	}

	public class AccessAttemptEventArgs : EventArgs
	{
		public IProgram Bypasser { get; set; }
		public List<object> Parameters { get; set; }
	}
}